<template>
  <div>
    <el-container style="height: 100vh;">
      <SideMenu></SideMenu>
      <el-container direction="vertical">
        <!-- <button @click="handleExit">退出</button> -->
        <TopHeader></TopHeader>
        <el-main>
          <el-scrollbar>
          <router-view></router-view>
        </el-scrollbar>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script setup>
import useRouterStore from '../store/useRouterStore';
import useUserStore from '../store/useUserStore';
import { useRouter } from 'vue-router'
import SideMenu from '../components/mainbox/SideMenu.vue'
import TopHeader from '../components/mainbox/TopHeader.vue'
const router = useRouter()
const { changeUser } = useUserStore()
const { changeRouter } = useRouterStore()
const handleExit = () => {
  //清空user
  changeUser({})
  //改变isGetterRouter
  changeRouter(false)
  //跳转回login页面
  router.push("/login")
}
</script>
<style scoped lang='scss'></style>